<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title><%= title %></title>
    <meta name="description" content="<%= description %>">
    <meta name="keywords" content="<%= keywords %>">
    
    <!-- Open Graph 元标签 -->
    <meta property="og:title" content="<%= title %>">
    <meta property="og:description" content="<%= description %>">
    <meta property="og:type" content="website">
    <meta property="og:locale" content="zh_CN">
    
    <!-- Tailwind CSS -->
    <script src="https://cdn.tailwindcss.com"></script>
    <!-- Font Awesome -->
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">

    <!-- 自定义样式 -->
    <link rel="stylesheet" href="/css/style.css">
    
    <!-- Favicon -->
    <link rel="icon" href="/images/button-mine.png" type="image/png">
</head>
<body>
    <!-- 加载动画 -->
    <div class="loading" id="loading">
        <div class="loading-spinner"></div>
    </div>

    <!-- 视频背景 -->
    <div class="video-background">
        <video 
            id="background-video"
            autoplay 
            muted 
            loop 
            playsinline 
            preload="metadata"
            poster="/images/home-bg.png"
        >
            <source src="/video/home.mp4" type="video/mp4">
            <!-- 备用背景图片 -->
            您的浏览器不支持视频播放，将显示默认背景。
        </video>
        <!-- 视频遮罩层 -->
        <div class="video-overlay"></div>
    </div>
    
    <!-- 备用波浪背景 (移动端和视频加载失败时显示) -->
    <div class="wave-bg"></div>
    
    <!-- 浮动气泡 -->
    <div class="bubble"></div>
    <div class="bubble"></div>
    <div class="bubble"></div>

    <!-- 导航栏 -->
    <nav class="navbar" id="navbar">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
            <div class="flex justify-between items-center h-16">
                <div class="flex items-center">
                    <img src="/images/logo.png" alt="潮汐漂流瓶" class="h-10 w-10 rounded-lg mr-3">
                    <span class="text-xl font-bold text-gray-800">潮汐漂流瓶</span>
                </div>
                <div class="hidden md:block">
                    <div class="flex items-center space-x-8">
                        <a href="#features" class="text-gray-700 hover:text-blue-600 transition-colors">功能特色</a>
                        <a href="#download" class="text-gray-700 hover:text-blue-600 transition-colors">立即下载</a>
                        <a href="/privacy" class="text-gray-700 hover:text-blue-600 transition-colors">隐私政策</a>
                        <a href="/terms" class="text-gray-700 hover:text-blue-600 transition-colors">用户协议</a>
                    </div>
                </div>
                <div class="md:hidden">
                    <button class="text-gray-700 hover:text-blue-600" id="mobile-menu-btn">
                        <i class="fas fa-bars text-xl"></i>
                    </button>
                </div>
            </div>
        </div>
        
        <!-- 移动端菜单 -->
        <div class="md:hidden hidden" id="mobile-menu">
            <div class="px-2 pt-2 pb-3 space-y-1 bg-white/95 backdrop-blur-lg">
                <a href="#features" class="block px-3 py-2 text-gray-700 hover:text-blue-600">功能特色</a>
                <a href="#download" class="block px-3 py-2 text-gray-700 hover:text-blue-600">立即下载</a>
                <a href="/privacy" class="block px-3 py-2 text-gray-700 hover:text-blue-600">隐私政策</a>
                <a href="/terms" class="block px-3 py-2 text-gray-700 hover:text-blue-600">用户协议</a>
            </div>
        </div>
    </nav>

    <!-- 主要内容 -->
    <main class="main-content">
        <!-- 英雄区域 -->
        <section class="hero">
            <div class="hero-content">
                <h1>潮汐漂流瓶</h1>
                <p class="subtitle">波纹写满故事，潮汐见证相逢</p>
                <p class="text-lg mb-8 opacity-90">
                    在数字海洋中投掷文字瓶子，与陌生人邂逅美好故事<br>
                    每一次捡起，都可能是命运的开始
                </p>
                <div class="flex flex-col sm:flex-row gap-4 justify-center">
                    <a href="#download" class="btn btn-primary">
                        <i class="fas fa-download mr-2"></i>
                        立即下载
                    </a>
                    <a href="#features" class="btn btn-secondary">
                        <i class="fas fa-compass mr-2"></i>
                        了解更多
                    </a>
                </div>
            </div>
        </section>

        <!-- 功能特色 -->
        <section class="features" id="features">
            <div class="max-w-7xl mx-auto">
                <div class="text-center mb-16">
                    <h2 class="text-4xl font-bold text-gray-800 mb-4">探索无限可能</h2>
                    <p class="text-xl text-gray-600">每个功能都承载着相遇的美好</p>
                </div>
                
                <div class="features-grid">
                    <div class="feature-card">
                        <div class="feature-icon">
                            <img src="/images/button-throw.png" alt="扔一个">
                        </div>
                        <h3>扔一个</h3>
                        <p>将你的心情、故事、想法装进漂流瓶，投向广阔的数字海洋。支持文字和语音消息，还可以选择同城投递或投递多份，让更多人感受你的温暖。</p>
                    </div>
                    
                    <div class="feature-card">
                        <div class="feature-icon">
                            <img src="/images/button-pickup.png" alt="捡一个">
                        </div>
                        <h3>捡一个</h3>
                        <p>用神奇的抄网在海中搜寻漂流瓶，每一次捞起都是一次惊喜。可能是来自远方的温暖问候，也可能是与你心有灵犀的知音。</p>
                    </div>
                    
                    <div class="feature-card">
                        <div class="feature-icon">
                            <img src="/images/button-mine.png" alt="我的瓶子">
                        </div>
                        <h3>我的瓶子</h3>
                        <p>管理所有的对话和连接，支持实时聊天、语音消息。通过关键词搜索轻松找到重要对话，让每一段相遇都不会丢失。</p>
                    </div>
                </div>
                
                <div class="mt-16 text-center">
                    <div class="inline-block bg-white rounded-2xl p-8 shadow-xl">
                        <h3 class="text-2xl font-bold text-gray-800 mb-4">
                            <i class="fas fa-heart text-red-500 mr-2"></i>
                            智能匹配系统
                        </h3>
                        <p class="text-gray-600 leading-relaxed max-w-2xl">
                            基于用户的兴趣标签、行为特征和地理位置，我们的智能算法会适度匹配志趣相投的人，
                            让每一次相遇都更有意义。同时完全保护用户隐私，让缘分自然发生。
                        </p>
                    </div>
                </div>
            </div>
        </section>

        <!-- 下载区域 -->
        <section class="download-section" id="download">
            <div class="max-w-4xl mx-auto">
                <h2 class="text-4xl font-bold text-gray-800 mb-4">开始你的海洋之旅</h2>
                <p class="text-xl text-gray-600 mb-8">扫描二维码或搜索小程序，立即体验潮汐漂流瓶</p>
                
                <div class="grid md:grid-cols-2 gap-8 items-center">
                    <div class="text-center">
                        <div class="qr-code mx-auto">
                            <div class="text-center">
                                <i class="fas fa-qrcode text-4xl text-gray-400 mb-2"></i>
                                <p class="text-sm">微信扫码体验</p>
                                <p class="text-xs text-gray-500 mt-1">搜索"潮汐漂流瓶"</p>
                            </div>
                        </div>
                    </div>
                    
                    <div class="space-y-6">
                        <div class="bg-white rounded-2xl p-6 shadow-lg">
                            <h4 class="text-lg font-semibold text-gray-800 mb-3 flex items-center">
                                <i class="fab fa-weixin text-green-500 mr-2"></i>
                                微信小程序
                            </h4>
                            <p class="text-gray-600 mb-4">在微信中搜索"潮汐漂流瓶"，无需下载安装即可体验</p>
                            <div class="flex items-center text-sm text-gray-500">
                                <i class="fas fa-check-circle text-green-500 mr-2"></i>
                                <span>支持iOS和Android</span>
                            </div>
                        </div>
                        
                        <div class="bg-white rounded-2xl p-6 shadow-lg">
                            <h4 class="text-lg font-semibold text-gray-800 mb-3 flex items-center">
                                <i class="fas fa-mobile-alt text-blue-500 mr-2"></i>
                                APP版本
                            </h4>
                            <p class="text-gray-600 mb-4">即将推出独立APP版本，敬请期待</p>
                            <div class="flex items-center text-sm text-gray-500">
                                <i class="fas fa-clock text-orange-500 mr-2"></i>
                                <span>开发中...</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </section>
    </main>

    <!-- 页脚 -->
    <footer class="footer">
        <div class="footer-content">
            <div class="footer-section">
                <h4>关于潮汐漂流瓶</h4>
                <p>一款温暖的社交应用，致力于为用户创造真实、有意义的连接体验。</p>
                <div class="flex space-x-4 mt-4">
                    <a href="javascript:void(0)" id="weixinBtn" class="text-gray-400 hover:text-white cursor-pointer">
                        <i class="fab fa-weixin text-xl"></i>
                    </a>
                    <a href="#" class="text-gray-400 hover:text-white">
                        <i class="fab fa-qq text-xl"></i>
                    </a>
                </div>
            </div>
            
            <div class="footer-section">
                <h4>产品功能</h4>
                <a href="#features">扔漂流瓶</a>
                <a href="#features">捡漂流瓶</a>
                <a href="#features">即时聊天</a>
                <a href="#features">智能匹配</a>
            </div>

            <div class="footer-section">
                <h4>法律声明</h4>
                <a href="/privacy">隐私政策</a>
                <a href="/terms">用户协议</a>
                <a href="/terms">服务条款</a>
                <a href="javascript:void(0)" id="contactBtn">联系我们</a>
            </div>
            
            <div class="footer-section">
                <h4>客服支持</h4>
                <p>客服邮箱：geiwokeji@126.com</p>
                <p>工作时间：周一至周五 9:00-18:00</p>
                <p>用户反馈微信群：添加客服微信拉群</p>
            </div>
        </div>
        
        <div class="footer-bottom">
            <p>&copy; 2025 潮汐漂流瓶团队. 保留所有权利.</p>
            <p class="mt-2">
                <a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener">
                    京ICP备12345678号-1
                </a>
                <!-- |
                <a href="https://beian.miit.gov.cn/" target="_blank" rel="noopener">
                    京公网安备xxx号
                </a> -->
            </p>
            <p class="mt-1 text-sm">
                违法和不良信息举报电话：18801116780
            </p>
        </div>
    </footer>

    <!-- 微信二维码弹窗 -->
    <div id="weixinModal" class="weixin-modal">
        <div class="weixin-modal-content">
            <div class="weixin-modal-header">
                <h3>扫码关注微信</h3>
                <span class="weixin-modal-close" id="weixinCloseBtn">&times;</span>
            </div>
            <div class="weixin-modal-body">
                <img src="/images/wx_scan.jpg" alt="微信二维码" class="weixin-qr-image">
                <p class="weixin-modal-text">扫描二维码关注我们</p>
            </div>
        </div>
    </div>

    <!-- JavaScript -->
    <script src="/js/main.js"></script>
    <script>
        // 联系方式弹窗
        function showContact() {
            alert('客服微信：geiwokeji\n客服邮箱：geiwokeji@126.com\n\n请添加微信或发送邮件获取帮助');
        }

        // 微信二维码弹窗
        function showWeixinQR() {
            const modal = document.getElementById('weixinModal');
            if (modal) {
                modal.style.display = 'flex';
                document.body.style.overflow = 'hidden'; // 禁止背景滚动
            }
        }

        function hideWeixinQR() {
            const modal = document.getElementById('weixinModal');
            if (modal) {
                modal.style.display = 'none';
                document.body.style.overflow = 'auto'; // 恢复背景滚动
            }
        }

        // 页面加载完成后添加事件监听器
        document.addEventListener('DOMContentLoaded', function() {
            // 微信按钮点击事件
            const weixinBtn = document.getElementById('weixinBtn');
            if (weixinBtn) {
                weixinBtn.addEventListener('click', function(e) {
                    e.preventDefault();
                    showWeixinQR();
                });
            }

            // 联系我们按钮点击事件
            const contactBtn = document.getElementById('contactBtn');
            if (contactBtn) {
                contactBtn.addEventListener('click', function(e) {
                    e.preventDefault();
                    showContact();
                });
            }

            // 弹窗关闭按钮事件
            const closeBtn = document.getElementById('weixinCloseBtn');
            if (closeBtn) {
                closeBtn.addEventListener('click', hideWeixinQR);
            }

            // 点击弹窗外部关闭
            const modal = document.getElementById('weixinModal');
            if (modal) {
                modal.addEventListener('click', function(e) {
                    if (e.target === modal) {
                        hideWeixinQR();
                    }
                });
            }

            // 阻止弹窗内容的点击事件冒泡
            const modalContent = document.querySelector('.weixin-modal-content');
            if (modalContent) {
                modalContent.addEventListener('click', function(e) {
                    e.stopPropagation();
                });
            }
        });

        // ESC键关闭弹窗
        document.addEventListener('keydown', function(event) {
            if (event.key === 'Escape') {
                hideWeixinQR();
            }
        });
    </script>
</body>
</html> 